import 'package:mobx/mobx.dart';
import 'package:dio/dio.dart';
import 'package:bookapp/api/http.dart';

part 'register_store.g.dart';

class RegisterStore = _RegisterStore with _$RegisterStore;

RegisterStore $store = RegisterStore();

abstract class _RegisterStore with Store {

  Map<String,String> testRegisterInfo = {
    'email': 'animg02',
    'name': 'Flutter02',
    'password': '0123',
    'phone': '0123'
  };


  void handleRegister() async {
    Response response = await HttpRequest().dio.post("/user/",data: testRegisterInfo);
    print(response);
  }

  @action
  void changeValue(String key,String value){
    testRegisterInfo[key] = value;
  }
}